const mongoose = require('mongoose')

const { Schema, model } = mongoose

//user模型
const homeOptionSchema = new Schema({
    __v: {
        type: Number,
        select: false,
    },
    name: { //选项名
        type: String,
        required: true,
    },
    img: { //选项图片
        type: String,
        default: '',
        select: false,
    },
    color: { //选项背景色
        type: String,
        default: 'rgb(15,153,213)',
        select: false,
    },
    url: { //选项跳转地址
        type: String,
        default: '',
        select: false,
    },
    state: { //状态码
        type: String,
        default: '0',
        select: false,
    },
    voice: { //语音地址
        type: String,
        default: '',
        select: false,
    },
    auther: { //创建人
        type: Schema.Types.ObjectId,
        ref: 'User',
        select: false,
    }
}, {timestamps: true})

module.exports = model('Home', homeOptionSchema)